package cate.game.role.res.guild.msg.envelope;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdGuild;

@ClientMsg(title = "公会红包信息请求")
public class GuildEnvelopReq implements MsgInput {
    @Override
    public MsgConfig conf() {
        return MsgIdGuild.GUILD_RED_ENVELOPE_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        if (!cc.getRole().getRes().guild.checkGuild().ok()) {
            game.notice.message(cc.getRole(),310450 ,"尚未加入公会");
            return;
        }
        cc.getRole().getRes().guild.getGuild().envelope.noticeUpdate(cc.getRole());
    }
}
